feat(manifest): explicit enable_constraints field; cap enabled_count at 8#70
Merged
Merged
Conversation
Closes #34. OctadConfig previously had no `enable_constraints` field. The Constraints dimension was "implied" via `if enabled_count > 2 { count += 1; }`, which meant: 1. Toggling any other dimension silently flipped Constraints ON or OFF in `print_status`. 2. The cap of 8 dimensions was implicit; nothing prevented overflow. 3. ADR-0001's first-class treatment of Constraints had no representation in the data model. Changes: - Add `enable_constraints: bool` to `OctadConfig` (defaults to true, serde rename `enable-constraints`). - Rewrite `enabled_count()` to count each `enable_*` field once. The implicit `+1` arithmetic is gone; the result is now guaranteed to be in `2..=8` by construction. - `print_status` reads `enable_constraints` directly instead of inferring it from the total count. - `init_manifest` template emits `enable-constraints = true`. - Update six existing test fixtures and one integration test that construct OctadConfig literals to include the new field. Add three new unit tests in `manifest::octad_tests`: - `enabled_count_is_in_range_2_to_8`: exhaustively checks all 64 combinations of the six togglable flags and asserts the result is always in 2..=8. - `enabled_count_with_all_off_is_two`: data + metadata baseline. - `enabled_count_with_all_on_is_eight`: full octad. `cargo clippy --all-targets -- -D warnings` clean; 29 unit tests pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
hyperpolymath
added a commit
that referenced
this pull request
Jun 26, 2026
## What & why The Zig FFI bridge is half of the ABI-FFI standard, but nothing installed Zig — `.tool-versions` only lists it (commented), `setup.sh` stopped at `just`, and the devcontainer's `postCreateCommand: just deps` referenced a `deps` recipe that didn't exist. And Zig is **not** distributed via GitHub releases, so it must come from `ziglang.org`, which isn't on the agent egress allowlist by default. ## Change - **`scripts/install-zig.sh`** — idempotent, fail-soft installer for the pinned **Zig 0.14.0** (arch/OS-aware, uses the proxy-populated system CA store, never `--insecure`). If `ziglang.org` is blocked it 403s and exits 0 with an actionable message, so it never blocks setup. - **`setup.sh`** — adds a Zig install step (where the template exposes one). - **`Justfile`** — new `deps` recipe (install Zig + `cargo fetch`) backing the devcontainer `postCreateCommand: just deps`. Once `ziglang.org` is allowlisted, future setups/dev-containers install Zig automatically. Part of a family-wide sweep; mirrors the merged iseriser reference (#70). (This repo already had a SessionStart hook; that is left untouched.) ## CI note The `rust-ci` and `Hypatia` checks are **pre-existing estate-infra reds** (the reusable rust-ci workflow's empty `toolchain` input, and the Hypatia analyzer failing to compile its own Elixir source) — neither is caused by this shell/Justfile change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_019xMKB3T4Vo5FYC7Czx3JSH --- _Generated by [Claude Code](https://claude.ai/code/session_019xMKB3T4Vo5FYC7Czx3JSH)_ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per V-L2-D1: Make Constraints a first-class octad dimension instead of an implicit "+1 when count>2" arithmetic side-effect, and prove the cap.
enable_constraints: booltoOctadConfig(defaulttrue)enabled_count()to be a pure sum over the six togglable flags; result guaranteed in2..=8by constructionprint_statusreadsenable_constraintsdirectly; toggling a different dimension no longer flips the Constraints lineinit_manifesttemplate emitsenable-constraints = trueCloses
Test plan
cargo clippy --all-targets -- -D warningscleanmanifest::octad_tests)enabled_count() ∈ 2..=8OctadConfig { ... }literals updated with the new field